home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / ControlStrip.mod < prev    next >
Encoding:
Text File  |  1995-08-10  |  5.9 KB  |  146 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        ControlStrip.mod
  3.  
  4.      Contains:    Control Strip (for Powerbooks and Duos) Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$TAGS-*)
  21. (*$CALLING PASCAL*)
  22. MODULE ControlStrip;
  23.  
  24. IMPORT SYSTEM, Types, Menus, Dialogs;
  25.  
  26. (* $PUSH*)
  27. (* $ALIGN MAC68K*)
  28. (* $LibExport+*)
  29.  
  30. CONST
  31.     sdevInitModule*                = 0;                            (* initialize the module*)
  32.     sdevCloseModule*                = 1;                            (* clean up before being closed*)
  33.     sdevFeatures*                = 2;                            (* return feature bits*)
  34.     sdevGetDisplayWidth*            = 3;                            (* returns the width of the module's display*)
  35.     sdevPeriodicTickle*            = 4;                            (* periodic tickle when nothing else is happening*)
  36.     sdevDrawStatus*                = 5;                            (* update the interface in the Control Strip*)
  37.     sdevMouseClick*                = 6;                            (* user clicked on the module's display area in the Control Strip*)
  38.     sdevSaveSettings*            = 7;                            (* saved any changed settings in module's preferences file*)
  39.     sdevShowBalloonHelp*            = 8;                            (* puts up a help balloon, if the module has one to display*)
  40.  
  41. (*********************************************************************************************
  42.  
  43.     Features supported by the module.  If a bit is set, it means that feature is supported.
  44.     All undefined bits are reserved for future use by Apple, and should be set to zero.
  45.  
  46. *********************************************************************************************)
  47.     sdevWantMouseClicks*            = 0;                            (* notify the module of mouseDown events*)
  48.     sdevDontAutoTrack*            = 1;                            (* call the module to do mouse tracking*)
  49.     sdevHasCustomHelp*            = 2;                            (* module provides its own help messages*)
  50.     sdevKeepModuleLocked*        = 3;                            (* module needs to be locked in the heap*)
  51.  
  52. (*********************************************************************************************
  53.  
  54.     Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
  55.     If a bit is set, the module can request that a specific function is performed by
  56.     the Control Strip.  A result of zero will do nothing.  All undefined bits are reserved
  57.     for future use by Apple, and should be set to zero.
  58.  
  59. *********************************************************************************************)
  60.     sdevResizeDisplay*            = 0;                            (* resize the module's display*)
  61.     sdevNeedToSave*                = 1;                            (* need to save changed settings, when convenient*)
  62.     sdevHelpStateChange*            = 2;                            (* need to update the help message because of a state change*)
  63.     sdevCloseNow*                = 3;                            (* close a module because it doesn't want to stay around*)
  64.  
  65. (*********************************************************************************************
  66.  
  67.     miscellaneous
  68.  
  69. *********************************************************************************************)
  70.     sdevFileType*                = LONG("sdev");
  71.  
  72.     sdevMenuItemMark*            = '•';
  73.  
  74. (*    direction values for SBDrawBarGraph*)
  75.     BarGraphSlopeLeft*            = -1;                            (* max end of sloping bar graph is on the left*)
  76.     BarGraphFlatRight*            = 0;                            (* max end of flat bar graph is on the right*)
  77.     BarGraphSlopeRight*            = 1;                            (* max end of sloping bar graph is on the right*)
  78.  
  79. (*********************************************************************************************
  80.  
  81.     utility routines to provide standard interface elements and support for common functions
  82.  
  83. *********************************************************************************************)
  84.  
  85. PROCEDURE SBIsControlStripVisible*(): BOOLEAN;
  86.     (*$IF NOT GENERATINGCFM*)
  87.     INLINE PASCAL $7000, $AAF2;
  88.     (*$END*)
  89. PROCEDURE SBShowHideControlStrip*(showIt: BOOLEAN);
  90.     (*$IF NOT GENERATINGCFM*)
  91.     INLINE PASCAL $303C, $0101, $AAF2;
  92.     (*$END*)
  93. PROCEDURE SBSafeToAccessStartupDisk*(): BOOLEAN;
  94.     (*$IF NOT GENERATINGCFM*)
  95.     INLINE PASCAL $7002, $AAF2;
  96.     (*$END*)
  97. PROCEDURE SBOpenModuleResourceFile*(fileCreator: Types.OSType): INTEGER;
  98.     (*$IF NOT GENERATINGCFM*)
  99.     INLINE PASCAL $303C, $0203, $AAF2;
  100.     (*$END*)
  101. PROCEDURE SBLoadPreferences*(prefsResourceName: Types.ConstStr255Param; VAR preferences: Types.Handle): Types.OSErr;
  102.     (*$IF NOT GENERATINGCFM*)
  103.     INLINE PASCAL $303C, $0404, $AAF2;
  104.     (*$END*)
  105. PROCEDURE SBSavePreferences*(prefsResourceName: Types.ConstStr255Param; preferences: Types.Handle): Types.OSErr;
  106.     (*$IF NOT GENERATINGCFM*)
  107.     INLINE PASCAL $303C, $0405, $AAF2;
  108.     (*$END*)
  109. PROCEDURE SBGetDetachedIndString*(theString: Types.StringPtr; stringList: Types.Handle; whichString: INTEGER);
  110.     (*$IF NOT GENERATINGCFM*)
  111.     INLINE PASCAL $303C, $0506, $AAF2;
  112.     (*$END*)
  113. PROCEDURE SBGetDetachIconSuite*(VAR theIconSuite: Types.Handle; theResID: INTEGER; selector: LONGINT): Types.OSErr;
  114.     (*$IF NOT GENERATINGCFM*)
  115.     INLINE PASCAL $303C, $0507, $AAF2;
  116.     (*$END*)
  117. PROCEDURE SBTrackPopupMenu*((*CONST*)VAR moduleRect: Types.Rect; theMenu: Menus.MenuHandle): Types.OSErr;
  118.     (*$IF NOT GENERATINGCFM*)
  119.     INLINE PASCAL $303C, $0408, $AAF2;
  120.     (*$END*)
  121. PROCEDURE SBTrackSlider*((*CONST*)VAR moduleRect: Types.Rect; ticksOnSlider: INTEGER; initialValue: INTEGER): Types.OSErr;
  122.     (*$IF NOT GENERATINGCFM*)
  123.     INLINE PASCAL $303C, $0409, $AAF2;
  124.     (*$END*)
  125. PROCEDURE SBShowHelpString*((*CONST*)VAR moduleRect: Types.Rect; helpString: Types.StringPtr): Types.OSErr;
  126.     (*$IF NOT GENERATINGCFM*)
  127.     INLINE PASCAL $303C, $040A, $AAF2;
  128.     (*$END*)
  129. PROCEDURE SBGetBarGraphWidth*(barCount: INTEGER): INTEGER;
  130.     (*$IF NOT GENERATINGCFM*)
  131.     INLINE PASCAL $303C, $010B, $AAF2;
  132.     (*$END*)
  133. PROCEDURE SBDrawBarGraph*(level: INTEGER; barCount: INTEGER; direction: INTEGER; barGraphTopLeft: Types.Point);
  134.     (*$IF NOT GENERATINGCFM*)
  135.     INLINE PASCAL $303C, $050C, $AAF2;
  136.     (*$END*)
  137. PROCEDURE SBModalDialogInContext*(filterProc: Dialogs.ModalFilterUPP; VAR itemHit: INTEGER);
  138.     (*$IF NOT GENERATINGCFM*)
  139.     INLINE PASCAL $303C, $040D, $AAF2;
  140.     (*$END*)
  141.  
  142. (* $ALIGN RESET*)
  143. (* $POP*)
  144.  
  145.  END ControlStrip.
  146.